package net.sareweb.acab.session;

import net.sareweb.acab.entity.*;
import java.util.ArrayList;
import java.util.List;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityHome;

@Name("suggestioninfoHome")
public class SuggestioninfoHome extends EntityHome<Suggestioninfo> {

	public void setSuggestioninfoIdSuggestionInfo(Integer id) {
		setId(id);
	}

	public Integer getSuggestioninfoIdSuggestionInfo() {
		return (Integer) getId();
	}

	@Override
	protected Suggestioninfo createInstance() {
		Suggestioninfo suggestioninfo = new Suggestioninfo();
		return suggestioninfo;
	}

	public void load() {
		if (isIdDefined()) {
			wire();
		}
	}

	public void wire() {
		getInstance();
	}

	public boolean isWired() {
		return true;
	}

	public Suggestioninfo getDefinedInstance() {
		return isIdDefined() ? getInstance() : null;
	}

	public List<Commentonsuggestion> getCommentonsuggestions() {
		return getInstance() == null ? null
				: new ArrayList<Commentonsuggestion>(getInstance()
						.getCommentonsuggestions());
	}

	public List<Suggestion> getSuggestions() {
		return getInstance() == null ? null : new ArrayList<Suggestion>(
				getInstance().getSuggestions());
	}

}
